package com.qf.dao.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.api.blog.entity.ArticleContentEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
* @author sin
* @description 针对表【t_article_content(文章内容表)】的数据库操作Mapper
* @createDate 2025-05-23 13:27:40
* @Entity com.qf.api.entity.TArticleContent
*/
@Mapper
public interface ArticleContentMapper extends BaseMapper<ArticleContentEntity> {

    @Select("select id from t_article_content where article_id = #{articleId}")
    Long selectContentIdByArticleId(Long articleId);

    @Select("update t_article_content set content = #{content} where article_id = #{articleId}")
    void updateByArticleId(@Param("articleId") Long articleId, @Param("content") String content);
}




